package com.wltt.product.ahuthr.controller;

import com.wltt.product.ahuthr.model.ResultData;
import com.wltt.product.ahuthr.service.SalaryHouseFundService;
import com.wltt.product.ahuthr.service.SalaryLevelService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

@RestController
@RequestMapping(value = "/api/salaryLevel")
public class SalaryLevelController {

    @Resource
    private SalaryLevelService salaryLevelService;

    /**
     * 导入薪级
     *
     * @return
     */
    @PostMapping(value = {"/importSalaryLevel"})
    public ResultData importSalaryLevel(@RequestParam("file") MultipartFile file) throws IOException {
        return salaryLevelService.importSalaryLevel(file);
    }
}
